<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html PUBLIC "-//W3C//Dtd XHTML 1.0 Transitional//EN" "http://www.w3.org/tr/xhtml1/Dtd/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="x-ua-compatible" content="IE=edge, chrome=1">
    <title>杨电网</title>
    <meta name="description" content="" />
    <meta name="keywords" content="" />
    <link href="/shop/public/home/css/public.css" type="text/css" rel="stylesheet"/>
    <link href="/shop/public/home/css/gouwuche.css" type="text/css" rel="stylesheet"/>
    <script type="text/javascript" src="/shop/public/home/js/jquery-1.7.2.min.js"></script>
    <script type="text/javascript" src="/shop/public/home/js/slide.js"></script>
</head>
<script>
    $(function(){
        $('.nav ul li').hover(function(){
            $(this).children(".details").show();
        },function(){
            $(this).children(".details").hide();
        });
        $('#my').hover(function(){
            $(this).find("div").show();
        },function(){
            $(this).find("div").hide();
        });
    });
</script>
<body>
<!------------顶部---------------->
<div class="top">
    <div class="wt1080">
        <div class="fl">
            <a href="index.html">洋店首页</a>&emsp;|&emsp;请&emsp;<a href="#" style="color: #ff9900">登陆</a>&emsp;或&emsp;<a href="#">立即注册</a>
        </div>
        <div class="fr">
            <ul>
                <li style="position: relative;" id="my">
                    <a href="<?php echo ($my_order); ?>">我的洋店 <img src="/shop/public/home/image/sanjiao.png"></a>
                    <div class="personal">
                        <dl>
                            <dt><a href="my_order.html">我的订单</a></dt>
                            <dd><a href="my_youhuijuan.html">我的优惠卷</a></dd>
                            <dd><a href="my_jifen.html">我的积分</a></dd>
                        </dl>
                    </div>
                </li>
                <li><span class="shop">购物车<a href="gouwuche.html">0</a>件</span></li>
                <li><span class="phone"><a href="article.html">手机洋店</a></span></li>
                <li><span><a href="article.html">关于洋店</a></span></li>
                <li><span><a href="article.html">帮助中心</a></span></li>
                <li><span class="phone2">028-6133 8882</span></li>
            </ul>
        </div>
    </div>
</div>
<!--------------logo搜索------------->
<div class="wt1080 header">
    <div class="logo fl"><a href="index.html"><img src="/shop/public/home/image/logo.png"></a></div>
    <div class="search fl">
        <div>
            <input name="search" type="text" class="a_search fl" placeholder="请输入关键字">
            <span class="b_search fl"></span>
            <div class="clear"></div>
        </div>
        <p>
            <a href="#" class="current">可莱丝</a>&nbsp;&nbsp;|&nbsp;&nbsp;
            <a href="#">森田药妆</a>&nbsp;&nbsp;|&nbsp;&nbsp;
            <a href="#">Montagne jeunesse</a>&nbsp;&nbsp;|&nbsp;&nbsp;
            <a href="#">丽得姿</a>
        </p>
    </div>
    <a class="my_shop fr" href="gouwuche.html">我的购物车<span>2</span></a>
    <div class="clear"></div>
</div>
<!--------------导航------------------>
<div class="nav">
    <div class="wt1080">
        <ul>
            <li>
                <a href="index.html" class="current"><span>首页</span></a>
            </li>
            <li>
                <a href="lanmu.html"><span>母婴专区</span></a>
                    <div class="details">

                                    <div class="item">
                                        <p class="title"><a href="lanmu.html">奶粉</a></p>
                                        <div class="ctgnamebox">
                                            <a href="liebiao.html" class="current">爱他美</a>
                                            <a href="liebiao.html">爱他美</a>
                                            <a href="liebiao.html">爱他美</a>
                                            <a href="liebiao.html">爱他美</a>
                                            <a href="liebiao.html">爱他美</a>
                                            <a href="liebiao.html">爱他美</a>
                                            <a href="liebiao.html">爱他美</a>
                                            <a href="liebiao.html">爱他美</a>
                                        </div>
                                    </div>

                                    <div class="item">
                                        <p class="title"><a href="#">奶粉</a></p>
                                        <div class="ctgnamebox">
                                            <a href="liebiao.html">爱他美</a>
                                            <a href="liebiao.html">爱他美</a>
                                            <a href="liebiao.html">爱他美</a>
                                            <a href="liebiao.html">爱他美</a>
                                        </div>
                                    </div>


                                    <div class="item">
                                        <p class="title"><a href="lanmu.html">奶粉</a></p>
                                        <div class="ctgnamebox">
                                            <a href="liebiao.html" class="current">爱他美</a>
                                            <a href="liebiao.html">爱他美</a>
                                            <a href="liebiao.html">爱他美</a>
                                            <a href="liebiao.html">爱他美</a>
                                            <a href="liebiao.html">爱他美</a>
                                            <a href="liebiao.html">爱他美</a>
                                            <a href="liebiao.html">爱他美</a>
                                            <a href="liebiao.html">爱他美</a>
                                        </div>
                                    </div>

                                    <div class="item">
                                        <p class="title"><a href="lanmu.html">奶粉</a></p>
                                        <div class="ctgnamebox">
                                            <a href="liebiao.html">爱他美</a>
                                            <a href="liebiao.html">爱他美</a>
                                            <a href="liebiao.html">爱他美</a>
                                            <a href="liebiao.html">爱他美</a>
                                        </div>
                                    </div>
                    </div>
            </li>
            <li><a href="lanmu.html"><span>美妆护肤</span></a></li>
            <li><a href="lanmu.html"><span>家具生活</span></a></li>
            <li><a href="lanmu.html"><span>食品营养</span></a></li>
            <li><a href="lanmu.html"><span>全球直邮</span></a></li>
            <li><a href="lanmu.html"><span>合作申请</span></a></li>
        </ul>
        <div style="clear:both"></div>
    </div>
</div>
<!---------------------导航完--------------------->

<!-- <!--------------------内容-----------------------> -->
<div class="wt1080">
   <!--  <!--------------标题-----------> -->
    <div class="my_car">
        <h1>我的购物车</h1>
        <div class="place">
            <ul>
                <li class="current"><span>1</span><p>我的购物车</p></li>
                <li><span>2</span><p>提交订单</p></li>
                <li><span>3</span><p>选择支付方式</p></li>
            </ul>
            <span class="heng"></span>
        </div>
    </div>
    <!-- <!--------------选择-----------> -->
 <form action="<?php echo ($addorder); ?>" method="post">
    <div class="details">
        <div class="title">
            <div style="text-align: left;width: 84px;"><img src="/shop/public/home/image/k1.png" style="float: left;margin-top: 1px;margin-right: 5px;cursor: pointer">全选</div>
            <div style="width: 432px;">商品</div>
            <div style="width: 141px;">单价</div>
            <div style="width: 141px;">数量</div>
            <div style="width: 141px;">合计</div>
            <div style="width: 141px;">操作</div>
        </div>
        <!-----------------------商品展示---------------------------->
        <div class="goods">
              <?php if(is_array($product)): $i = 0; $__LIST__ = $product;if( count($__LIST__)==0 ) : echo "" ;else: foreach($__LIST__ as $key=>$vo): $mod = ($i % 2 );++$i;?><div class="goods_details selected">
                        <input type="hidden" class="gouwuche_id" name="gouwuche_id[]" value="<?php echo ($vo["id"]); ?>" >
                        <div class="g_one" ><a href="javascript:;"><img src="/shop/public/home/image/k2.png "></a></div>
                        <div class="g_two">
                            <div class="h">
                                <div class="pic">
                                    <a href="#"><img src="/shop/uploads/<?php echo ($vo["img"]); ?>"></a>
                                </div>
                                <div class="miaoshu">
                                    <p style="margin-top: 5px;"><a href="#"><?php echo ($vo["description"]); ?></a></p>
                                    <p style="color: #888888;margin-top: 5px;">杭州保税区仓</p>
                                </div>                    
                            </div>
                        </div>
                        <div class="g_three"><p class="y">￥</p><p class="k">￥<?php echo ($vo["price"]); ?></p></div>
                        <div class="g_four">
                            <div>
                                <span class="zuo" style="border-right: 1px solid #eeeeee">-</span>
                                <input name="" type="text" value="<?php echo ($vo["product_nub"]); ?>">
                                <span class="you" style="border-left: 1px solid #eeeeee">+</span>
                            </div>
                        </div>                   
                        <div class="g_five"><p>￥<?php echo ($vo["total"]); ?></p></div>
                        <div class="g_six"><span></span></div>
                    </div><?php endforeach; endif; else: echo "" ;endif; ?>
                           <script type="text/javascript">    
                                     $('.you').on('click',function(){
                                        var num = $(this).parent().find('input').val();
                                        num = parseInt(num);
                                        // console.log(num);
                                        var gouwuche_id = $(this).parent().parent().parent().find('.gouwuche_id').val();
                                          // console.log(product_id);
                                        var a =  $(this).parent().find('input');
                                        var price = $(this).parent().parent().prev().find('.k');
                                        var num = $(this).parent().find ('input');
                                        var zj = $(this).parent().parent().parent().find('.g_five').find('p')
                                        // console.log(a);
                                        $.ajax({
                                                 type:'post',
                                                 url:'<?php echo ($savegouwuche); ?>',
                                                 data:'product_nub='+num+'&gouwuche_id='+gouwuche_id+'&flag=you',
                                                 dataType:'json',
                                                 success:function(data){
                                                    if (data.status=='ok') {
                                                     // num = parseInt(num);
                                                     // console.log(data.num);
                                                     var nub = data.num; 
                                                     // console.log(num);
                                                     $(a).val(nub);
                                                     price =$(price).text();
                                                     price = price.substring(1);
                                                     // console.log(price); 
                                                     price = parseFloat(price);  
                                                     num = $(num).val();
                                                     // console.log(price);
                                                     num = parseInt(num);
                                                     var total = '￥'+price*num;
                                                    // console.log(total);    
                                                    $(zj).text(total);
                                                  }
                                                },
                                           }); 
                                         // return false;
                                       });
                                       $('.zuo').on('click',function(){
                                        var num = $(this).parent().find('input').val();
                                        num = parseInt(num);
                                        // console.log(num);
                                        var gouwuche_id = $(this).parent().parent().parent().find('.gouwuche_id').val();
                                          // console.log(product_id);
                                        var a =  $(this).parent().find('input');
                                        var price = $(this).parent().parent().prev().find('.k');
                                        var num = $(this).parent().find ('input');
                                        var zj = $(this).parent().parent().parent().find('.g_five').find('p')
                                        // console.log(a);
                                        $.ajax({
                                                 type:'post',
                                                 url:'<?php echo ($savegouwuche); ?>',
                                                 data:'product_nub='+num+'&gouwuche_id='+gouwuche_id+'&flag=zuo',
                                                 dataType:'json',
                                                 success:function(data){
                                                    if (data.status=='ok') {
                                                     // num = parseInt(num);
                                                     // console.log(data.num);
                                                     var nub = data.num; 
                                                     // console.log(num);
                                                     $(a).val(nub);
                                                     price =$(price).text();
                                                     price = price.substring(1);
                                                     // console.log(price); 
                                                     price = parseFloat(price);  
                                                     num = $(num).val();
                                                     // console.log(price);
                                                     num = parseInt(num);
                                                     var total = '￥'+price*num;
                                                    // console.log(total);    
                                                    $(zj).text(total);
                                                  }
                                                },
                                           }); 
                                         // return false;
                                       }); 
                                     //    $('.zuo').on('click',function(){
                                     //        var num = $(this).parent().find('input').val();
                                     //        num = parseInt(num);
                                     //        if (num>1) {
                                     //            num = num-1;                      
                                     //        }else{
                                     //            num=1
                                     //        }
                                     //        $(this).parent().find('input').val(num);
                                     //          var price = $(this).parent().parent().prev().find('.k').text();
                                     //            price = price.substring(1);
                                     //            console.log(price); 
                                     //            price = parseFloat(price);  
                                     //            var num = $(this).parent().find('input').val();
                                     //            // console.log(price);
                                     //            num = parseInt(num);
                                     //            var total = '￥'+price*num;
                                     //            // console.log(total);    
                                     //            $(this).parent().parent().parent().find('.g_five').find('p').text(total);                     
                                     // });                         

                                // $('.g_six').on('click',function(){
                                //     var row = $(this).parent();
                                //     var product_id = $(this).parent().find('input').find('.product_id').val();
                                //     console.log(product_id);
                                //      $.ajax({
                                //                  type:'post',
                                //                  url:'<?php echo ($delgouwuche); ?>',
                                //                  data:'product_nub='+num+'&product_id='+product_id,
                                //                  dataType:'json',
                                //                  success:function(data){
                                // }); 
                                 $(function(){
                                    $(".g_one a").toggle(function () {
                                            $(this).children('img').attr('src','/shop/public/home/image/k1.png');
                                            $(this).parent().parent().attr('class',' goods_details select');
                                              // console.log(a);
                                           // var a $('.goods_details').attr('id');
                                           // console.log(a);
                                           //     var this_total = $(this).parent().parent().find('.g_five').find('p').text();
                                                // console.log(total);
                                                // var goods_details = $('.goods_details');
                                                 // console.log($(goods_details));
                                                // .find('.g_five').find('p').text());
                                                // console.log(goods_details.length);
                                                // var total=0;
                                                // for (var i = 0; i < goods_details.length; i++) {
                                                //     var id = $(goods_details[i]).attr('id');
                                                //     // console.log(id);
                                                //     if (id=='selected') {
                                                //     var price = $(goods_details[i]).find('.g_five').find('p').text(); 
                                                //     total = total +parseInt(price);
                                                //     }
                                                //  }
                                                // $(this).parent().parent().parent().parent().find('.d_d').find('.d_d_r').find('.o').find('.p').text(total);
                                            $.ajax({
                                                    type:'post',
                                                    url:'<?php echo ($totalgouwuche); ?>',
                                                    data:'',
                                                    dataType:'json',
                                                    success:function(data){
                                             if (data.status=='ok') {
                                                        var s = $('.selected');
                                                        var t = $('.o');   
                                                        var total = 0;
                                                        for (var i = 0; i < s.length; i++) {
                                                            var price = $(s[i]).find('.g_five').find('p').text();
                                                            // console.log(price); 
                                                            price = price.substring(1);
                                                            // console.log(price); 
                                                            price = parseFloat(price);
                                                            total = total+price;    
                                                        }
                                                        $(t).find('.p').text(total);
                                                    }
                                                   },
                                            });
                                        },function () {
                                                $(this).children('img').attr('src','/shop/public/home/image/k2.png');
                                                $(this).parent().parent().attr('class',' goods_details selected');
                                                $.ajax({
                                                    type:'post',
                                                    url:'<?php echo ($totalgouwuche); ?>',
                                                    data:'',
                                                    dataType:'json',
                                                    success:function(data){
                                                if (data.status=='ok') {
                                                        var s = $('.selected');
                                                        var t = $('.o');   
                                                        var total = 0;
                                                        for (var i = 0; i < s.length; i++) {
                                                            var price = $(s[i]).find('.g_five').find('p').text();
                                                            // console.log(price); 
                                                            price = price.substring(1);
                                                            // console.log(price); 
                                                            price = parseFloat(price);
                                                            total = total+price;    
                                                        }
                                                        $(t).find('.p').text(total);
                                                    }
                                                   },
                                            });
                                               //  var this_total = $(this).parent().parent().find('.g_five').find('p').text();
                                               //  // console.log(total);
                                               //  var goods_details = $('.goods_details');
                                               //  // console.log($(goods_details[1]).find('.g_five').find('p').text());
                                               //  // console.log(goods_details.length);
                                               //  var total=0;
                                               //  for (var i = 0; i < goods_details.length; i++) {
                                               //      var price = $(goods_details[i]).find('.g_five').find('p').text();
                                               //      // console.log(total);
                                               //      total = total +parseInt(price);                            
                                               //  }
                                               //  var t = total;
                                               // var s= $(this).parent().parent().parent().parent().find('.d_d').find('.d_d_r').find('.o').find('.p').text(t);
                                               // console.log(s);
                                            }
                                        );
                                    });                            
                              </script>  
        </div>
        <!------------------下部分------------------>
        <div class="d_d">
            <div class="d_d_l">
                <a href="javascript:;" id="all"><img src="/shop/public/home/image/k1.png" style="float: left;margin-top: 22px;margin-right: 5px;">全选</a>
                <a href="#" style="margin-left: 10px;">删除选中商品</a>
            </div>

            <div class="d_d_r">
                <p class="o">已选商品<span>1</span>件<font>总价（不含运费）：<span class="p"><?php echo ($total); ?></span></font></p>
                <p class="t">商品应付总计：￥<?php echo ($total); ?><font>订单关税：￥0</font></p>
            </div>
            <button class="jiesuan">去结算</button>
        </div>
    </div>
</form>
    <!---------------------热销------------------>
    <div class="hot">
        <div class="title">热销推荐</div>
        <div class="content">
            <ul>
                <li>
                    <div class="pic"><a href="#"><img src="/shop/public/home/image/p11.png"></a></div>
                    <p class="c_t"><a href="#">Regen/丽珍 纯棉超细纤维美白皮肤面膜贴 10片</a></p>
                    <p class="price">￥89.00</p>
                    <a href="#" class="goumai">立即购买</a>
                </li>
                <li>
                    <div class="pic"><a href="#"><img src="/shop/public/home/image/p11.png"></a></div>
                    <p class="c_t"><a href="#">Regen/丽珍 纯棉超细纤维美白皮肤面膜贴 10片</a></p>
                    <p class="price">￥89.00</p>
                    <a href="#" class="goumai">立即购买</a>
                </li>
                <li>
                    <div class="pic"><a href="#"><img src="/shop/public/home/image/p11.png"></a></div>
                    <p class="c_t"><a href="#">Regen/丽珍 纯棉超细纤维美白皮肤面膜贴 10片</a></p>
                    <p class="price">￥89.00</p>
                    <a href="#" class="goumai">立即购买</a>
                </li>
                <li>
                    <div class="pic"><a href="#"><img src="/shop/public/home/image/p11.png"></a></div>
                    <p class="c_t"><a href="#">Regen/丽珍 纯棉超细纤维美白皮肤面膜贴 10片</a></p>
                    <p class="price">￥89.00</p>
                    <a href="#" class="goumai">立即购买</a>
                </li>
                <li>
                    <div class="pic"><a href="#"><img src="/shop/public/home/image/p11.png"></a></div>
                    <p class="c_t"><a href="#">Regen/丽珍 纯棉超细纤维美白皮肤面膜贴 10片</a></p>
                    <p class="price">￥89.00</p>
                    <a href="#" class="goumai">立即购买</a>
                </li>
            </ul>
            <div class="clear"></div>
        </div>
    </div>
</div>





<!---------------------保障------------------->
<div class="baozhang">
    <div class="wt1080">
        <ul>
            <li>
                <img src="/shop/public/home/image/c1.png">
                <p>全球正品货源</p>
            </li>
            <li>
                <img src="/shop/public/home/image/c2.png">
                <p>一件代发</p>
            </li>
            <li>
                <img src="/shop/public/home/image/c3.png">
                <p>全球直邮</p>
            </li>
            <li>
                <img src="/shop/public/home/image/c5.png">
                <p>售后无忧</p>
            </li>
        </ul>
        <div class="clear"></div>
    </div>
</div>
<!---------------底部--------------->
<div class="footer">
    <div class="wt1080" style="position: relative">
        <div class="a_footer">
            <div class="left">
                <a href="#"><img src="/shop/public/home/image/logo.png"></a>
                <p class="lianxi">
                    <a href="#"><img src="/shop/public/home/image/weixin.png"></a>
                    <a href="#"><img src="/shop/public/home/image/weibo.png"></a>
                    <a href="#"><img src="/shop/public/home/image/QQ.png"></a>
                    <span>028-6133 8882</span>
                </p>
            </div>
            <div class="right">
                <ul>
                    <li>
                        <dl>
                            <dt><a href="#">新手指南</a></dt>
                            <dd><a href="#">购物流程</a></dd>
                            <dd><a href="#">支付方式</a></dd>
                            <dd><a href="#">通关关税</a></dd>
                            <dd><a href="#">常见问题</a></dd>
                        </dl>
                    </li>
                    <li>
                        <dl>
                            <dt><a href="#">新手指南</a></dt>
                            <dd><a href="#">购物流程</a></dd>
                            <dd><a href="#">支付方式</a></dd>
                            <dd><a href="#">通关关税</a></dd>
                            <dd><a href="#">常见问题</a></dd>
                        </dl>
                    </li>
                    <li>
                        <dl>
                            <dt><a href="#">新手指南</a></dt>
                            <dd><a href="#">购物流程</a></dd>
                            <dd><a href="#">支付方式</a></dd>
                            <dd><a href="#">通关关税</a></dd>
                        </dl>
                    </li>
                    <li>
                        <dl>
                            <dt><a href="#">新手指南</a></dt>
                            <dd><a href="#">购物流程</a></dd>
                            <dd><a href="#">支付方式</a></dd>
                            <dd><a href="#">通关关税</a></dd>
                            <dd><a href="#">常见问题</a></dd>
                        </dl>
                    </li>
                </ul>
            </div>
        </div>
        <div class="clear"></div>
        <div class="weixin"><img src="/shop/public/home/image/weixin1.png"><p>扫描二维码下载APP</p></div>
        <!------------------------>
        <p class="beian">Copyright © 2016 洋店网.版权所有.备案号：京ICP证35124521号.技术支持：西部网络</p>
    </div>
</div>
</body>
</html>